package net.versiforma.libraryreminder.librarycontrollers;

import net.versiforma.libraryreminder.LibraryAccount;

public class LibraryController {
	
	
	private static LibraryInterface lc;
	
	
	public static LibraryInterface getLibraryInterface(LibraryAccount account) throws Exception {
		// Decide which LibraryController is to be used with this account
		if 		(account.getLibraryName().contains("VÖBB"))					lc = new VoebbController(account);
		else if	(account.getLibraryName().contains("Staatsbibliothek"))		lc = new StabiController(account);
		else
			throw new Exception("Unimplemented library: " + account.getLibraryName());
		return lc;
	}
}
